package cn.tedu.demo;

import java.util.Scanner;

/**
 * @author CCFu
 * @version 1.0
 * @date 2021/11/9 8:32
 */
public class Test5 {
    public static void main(String[] args) {
        m1();
    }
    public static void m1(){
        for (int j = 1; j < 1000; j++) {
            int count = 0;
            for (int i = 1; i <= j; i++) {
                if (j % i == 0) {
                    if (j != i) {
                        count +=i;
                    }
                }
            }
            if (count == j) {
                System.out.println(j);
            }
        }
        /*1 2 3 4 6 8 12 24*/
    }
}
